<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.player.fragment.PlayerFragment">


    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true">


        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingBottom="28dp">

            <ImageView
                android:id="@+id/back"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="16dp"
                android:layout_marginTop="16dp"
                android:foreground="?attr/selectableItemBackground"
                android:src="@drawable/arrow_back_regular_black"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:tint="?attr/text_color_primary" />


            <ImageView
                android:id="@+id/trackCover"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="24dp"
                android:layout_marginTop="46dp"
                android:layout_marginEnd="24dp"
                android:src="@drawable/placeholder"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/back" />

            <TextView
                android:id="@+id/trackName"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginTop="24dp"
                android:layout_marginEnd="24dp"
                android:ellipsize="end"
                android:fontFamily="@font/ys_display_medium"
                android:maxLines="1"
                android:textColor="?attr/text_color_primary"
                android:textSize="22sp"
                app:layout_constrainedWidth="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/trackCover"
                app:layout_constraintVertical_chainStyle="spread"
                tools:text="Yesterday (Remastered 2009)" />

            <TextView
                android:id="@+id/artistName"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginTop="12dp"
                android:layout_marginEnd="24dp"
                android:ellipsize="end"
                android:fontFamily="@font/ys_display_medium"
                android:maxLines="1"
                android:textColor="?attr/text_color_primary"
                android:textSize="14sp"
                app:layout_constrainedWidth="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/trackName"
                tools:text="The Beatles" />

            <ImageButton
                android:id="@+id/add_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="24dp"
                android:layout_marginTop="54dp"
                android:background="@null"
                android:src="@drawable/add_button"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/artistName" />

            <ImageButton
                android:id="@+id/play_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="30dp"
                android:background="@null"
                android:src="@drawable/play_button"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/artistName" />

            <ImageButton
                android:id="@+id/like_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="54dp"
                android:layout_marginEnd="24dp"
                android:background="@null"
                android:src="@drawable/like_button"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@id/artistName" />

            <TextView
                android:id="@+id/elapsedTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="4dp"
                android:fontFamily="@font/ys_display_regular"
                android:text="@string/trackTime_placeholder"
                android:textColor="?attr/text_color_primary"
                android:textSize="14sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/play_button" />

            <TextView
                android:id="@+id/trackDurationText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="39dp"
                android:fontFamily="@font/ys_display_regular"
                android:text="@string/duration_text"
                android:textColor="@color/YP_Text_Gray"
                android:textSize="13sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/elapsedTime" />

            <TextView
                android:id="@+id/trackDuration"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:fontFamily="@font/ys_display_regular"
                android:textColor="?attr/text_color_primary"
                android:textSize="13sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/trackDurationText"
                tools:text="5:35" />

            <TextView
                android:id="@+id/trackAlbumText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="17dp"
                android:fontFamily="@font/ys_display_regular"
                android:text="@string/trackAlbumText"
                android:textColor="@color/YP_Text_Gray"
                android:textSize="13sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/trackDurationText" />

            <TextView
                android:id="@+id/trackAlbum"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:ellipsize="end"
                android:fontFamily="@font/ys_display_regular"
                android:maxLines="1"
                android:textColor="?attr/text_color_primary"
                android:textSize="13sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/trackAlbumText"
                tools:text="Yesterday (Remastered 2009)" />

            <TextView
                android:id="@+id/trackYearText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="17dp"
                android:fontFamily="@font/ys_display_regular"
                android:text="@string/trackYearText"
                android:textColor="@color/YP_Text_Gray"
                android:textSize="13sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/trackAlbumText" />

            <TextView
                android:id="@+id/trackYear"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:fontFamily="@font/ys_display_regular"
                android:textColor="?attr/text_color_primary"
                android:textSize="13sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/trackYearText"
                tools:text="1965" />

            <TextView
                android:id="@+id/trackGenreText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="17dp"
                android:fontFamily="@font/ys_display_regular"
                android:text="@string/trackGenreText"
                android:textColor="@color/YP_Text_Gray"
                android:textSize="13sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/trackYearText" />

            <TextView
                android:id="@+id/trackGenre"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:ellipsize="end"
                android:fontFamily="@font/ys_display_regular"
                android:maxLines="1"
                android:textColor="?attr/text_color_primary"
                android:textSize="13sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/trackGenreText"
                tools:text="Rock" />

            <TextView
                android:id="@+id/trackCountryText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginTop="17dp"
                android:fontFamily="@font/ys_display_regular"
                android:text="@string/trackCountryText"
                android:textColor="@color/YP_Text_Gray"
                android:textSize="13sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/trackGenreText" />

            <TextView
                android:id="@+id/trackCountry"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="16dp"
                android:ellipsize="end"
                android:fontFamily="@font/ys_display_regular"
                android:maxLines="1"
                android:textColor="?attr/text_color_primary"
                android:textSize="13sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/trackCountryText"
                tools:text="Великобритания" />


        </androidx.constraintlayout.widget.ConstraintLayout>

    </ScrollView>

    <View
        android:id="@+id/overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#99000000"
        android:visibility="gone" />

    <LinearLayout
        android:id="@+id/bottom_sheet"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/bs_background"
        android:orientation="vertical"
        app:behavior_hideable="true"
        app:behavior_peekHeight="400dp"
        app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

        <View
            android:layout_width="40dp"
            android:layout_height="4dp"
            android:layout_gravity="center"
            android:layout_marginTop="8dp"
            android:background="@color/handler_elem" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="12dp"
            android:fontFamily="@font/ys_display_medium"
            android:gravity="center_horizontal"
            android:paddingTop="16dp"
            android:paddingBottom="12dp"
            android:text="@string/add_to_playlist"
            android:textColor="?attr/text_color_primary"
            android:textSize="19sp" />

        <Button
            android:id="@+id/new_playlist_button"
            style="@style/button_refresh"
            android:layout_marginTop="@dimen/margin_24"
            android:text="@string/createPlaylist"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:listitem="@layout/playlist_view_linear" />
    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>